ATR Bands with QQE [LM]Hello traders,
I would like to present you ATR Bands with QQE. This indicator is different than my other indicators I used QQE oscillator as an entry indicator, and atr bands I have used as an exit indicator.
You can see 2 set of bands with different multiplicator, first is used as first target profit, stop loss and second as a second target
There are two modes that takes, first is static mode that gives you lines with 1st, 2nd target profit and in red color stop loss.
Second mode has static first target and trailing stop loss
Settings:
Genreal settings - basic setting of source for atr bands, line settings,
First atr bands setting
Second atr bands setting
QQE settings
Cheers,
Lukas
Cerca negli script per "stop loss"
3Commas Visible DCA StrategyThis strategy consists of the following elements and can all be set by the user.
1. Entry by moving average cross.
1) Selection of moving average line.
- SMA(Simple Moving Average)
- EMA(Exponential Moving Average)
- HMA(Hull Moving Average)
2) Selection of Cross over / Cross under
2. Add Entry by DCA(Dollar Cost Averaging)
- A DCA strategy is the practice of investing into a currency at preset intervals to reduce the entry price of a position over time and mitigate volatility risk.
For example,
Base Order = 10 Dollar at Price 100%
Safety Order1 = 20 Dollar at Price 90%
Safety Order2 = 40 Dollar at Price 80%
Average Price => Price 80~90%
thereby getting a better average price for your position and greatly reducing risks from the consequences of volatility.
3. Target Price and Stop Loss.
1) Target Price : Realize profits at % set from the average unit price.
2) Stop Loss : Stop Loss % set from the last safety order.
You can easily find out what's related by changing the setting value after setting the strategy.
This strategy has the following Good characteristics.
1. It informs you of the assets required according to DCA settings.
If you are short of assets, a warning sign will appear.
2. Amount of assets invested in each long entry and long entry close.
3. Visibility of the lowest purchase price line and DCA purchase location according to DCA setting.
easily check the values set in the backtest.
I hope it will help you. Thank you.
Trend Strategy by zdmreThis Strategy is a trend following indicator. It is plotted on price and the current trend can be determined by its placement vis-a-vis price. It is constructed with just three parameters: Period, Multiplier and Entry/Exit Point with Superformula.
The default parameters are 14 for Average True Range (ATR) and 4 for its multiplier. The average true range (ATR) plays a key role in ‘Trend’ as the indicator uses ATR to compute its value and it signals the degree of price volatility. You should note that any changes to these numbers can affect the use of the Trend indicator.
While you using this indicator, you should not avoid putting your stop loss.
For a long position, you can put stop loss right at the red indicator line. For a short position, you can put it at the green indicator line. You can insert your own settings as well.
Using Trend Strategy along with a stop loss pattern is the best way for earning the best wealth in trading.
There is no best setting for any trading indicator.
EMA pullback strategyA solid EMA pullback strategy for cryptos 15 min chart that uses EMA crossing as signal and pullback as stop loss.
EMA1: shortest period for finding crossing (I find period = 33 profitable for BTCUSD, you can adjust it for other cryptos)
EMA2: 5x period of EMA1, for filtering out some trend reversals
EMA3: 11x period of EMA1, for determining trend direction
Rules are:
Long:
close price > EMA3
EMA1 > EMA3
close price pullbacks below EMA1 and then crosses up EMA1, enter at the first close price above EMA1
lowest pullback close price < EMA2 at the cross up
Short:
close price < EMA3
EMA1 < EMA3
close price pullbacks above EMA1 and then crosses down EMA1, enter at the first close price below EMA1
highest pullback close price > EMA2 at the cross down
Stop-loss at lowest/highest pullback price for long/short
Take profit = 2x stop-loss
Risk management: risk range can be set in the inspector. If the risk is lower than the range, the trade is not taken. if the risk is higher than the range, the position size is adjusted to keep the risk within range.
8 Whittle DownThe system is designed to short on directionally negative instruments like VXX & SQQQ
The system only shorts, no longs
It enters a pilot position if the system has no trades open at the time is in the late afternoon
It uses a 200-day moving average as a filter and will only short if the price is below the 200 day moving average
The pilot position will only enter with 1/3 ( one third ) of the total expected position size
StopLossPerc sets the stop loss, (1.15) means it is set to a 15% stop loss. -- The Red Line
The system will buy additional shares for a full position if the pilot piston profit target was not reached
The full shares position is set to purchase at a higher price. T2EntTrgPerc sets the buy percentage target for the additional shares. -- The Yellow Line
Each entry has different settable profit targets. T1ProfTrgPerc sets the profit target for the first trade (0.95) is basically set to a 5% profit.
T2ProfTrgPerc sets the profit target for the second trade (0.90) is basically set to a 10% profit. -- The White Line
RED LINE == STOP LOSS LINE
GREENLINE == PROFIT TARGET FOR THE 1ST TRADE
YELLOW LINE == ADD ON SHARES TO THE TRADE
WHITE LINE == PROFIT TARGET FOR THE 1st & 2nd TRADE COMBINED
Let me know if you have any questions and I'll try to clarify
M8 BUY @ END OF DAYI've read a couple of times at a couple of different places that most of the move in the market happens after hours, meaning during non-standard trading hours.
After-market and pre-market hours and have seen data presented showing that systems which bought just before end normal market hours and sold the next morning had really amazing resutls.
But when testing those I found the results to be quite poor compared to the pretty graphs I saw, and after much tweaking and trying different ideas I gave up on the idea until I recently decided to try a new position management system.
The System
Buys at the end of the trading day before the close
Sells the next morning at the open IF THE CLOSE OF THE CURRENT BAR IS HIGHER THAN THE ENTRY PRICE
When the current price is not higher, the system will keep the position open until it EITHER gets stops out or closes on profit <<< this is WHY it has the high win %
The system has a high win ratio because it will keep that one position open until it either reaches profit or stops out
This "system" of waiting, and keeping the trade open, actually turned out to be a fantastic way to kind of put the complete trading strategy in a kind of limbo mode. It either waits for market failure or for a profit.
I don't really care about win % at all, almost always high win % ratio systems are just nonsense. What I look for is a PF -- profit factor of 1.5 or above, and a relatively smooth equity curve. -- This has both.
The Stop Loss setting is set @ .95, meaning a 5% stop loss. The Red Line on the chart is the stop loss line.
There is no set profit target -- it simply takes what the market gives.
Non-Repainting System
This does use a 200D Simple Moving Average as a filter. Like a Green Light / Red Light traffic light, the system will only trade long when the price is above its 200 Moving average.
Here is the code: "F1 = close > sma(security(syminfo.tickerid, "D", close ), MarketFilterLen) // HIGH OF OLD DATA -- SO NO REPAINTING"
I use "close ", so that's data from two days ago, it's fixed, confirmed, non-repainting data from the higher timeframe.
-- I would only suggest using this on direction tickers like SPY, QQQ, SSO, TQQQ, market sectors with additional filters in place.
VR-MASTThis is a my script for a super simple trading strategy - ZEST.
Identify Zone of Value, Enter on pullback, place proper Stop Loss and set achievable Targets.
So, to identify Zone of Value, I have EMA in my script.
20EMA generally acts as a dynamic Support/Resistance zone.
For Buy Stop Loss, we have 1ATR below Swing Low.
Then, we have SuperTrend for Trailing Stop Loss.
Ultimate Strategy TemplateHello Traders
As most of you know, I'm a member of the PineCoders community and I sometimes take freelance pine coding jobs for TradingView users.
Off the top of my head, users often want to:
- convert an indicator into a strategy, so as to get the backtesting statistics from TradingView
- add alerts to their indicator/strategy
- develop a generic strategy template which can be plugged into (almost) any indicator
My gift for the community today is my Ultimate Strategy Template
Step 1: Create your connector
Adapt your indicator with only 2 lines of code and then connect it to this strategy template.
For doing so:
1) Find in your indicator where are the conditions printing the long/buy and short/sell signals.
2) Create an additional plot as below
I'm giving an example with a Two moving averages cross.
Please replicate the same methodology for your indicator wether it's a MACD, ZigZag, Pivots, higher-highs, lower-lows or whatever indicator with clear buy and sell conditions
//@version=4
study(title='Moving Average Cross', shorttitle='Moving Average Cross', overlay=true, precision=6, max_labels_count=500, max_lines_count=500)
type_ma1 = input(title="MA1 type", defval="SMA", options= )
length_ma1 = input(10, title = " MA1 length", type=input.integer)
type_ma2 = input(title="MA2 type", defval="SMA", options= )
length_ma2 = input(100, title = " MA2 length", type=input.integer)
// MA
f_ma(smoothing, src, length) =>
iff(smoothing == "RMA", rma(src, length),
iff(smoothing == "SMA", sma(src, length),
iff(smoothing == "EMA", ema(src, length), src)))
MA1 = f_ma(type_ma1, close, length_ma1)
MA2 = f_ma(type_ma2, close, length_ma2)
// buy and sell conditions
buy = crossover(MA1, MA2)
sell = crossunder(MA1, MA2)
plot(MA1, color=color_ma1, title="Plot MA1", linewidth=3)
plot(MA2, color=color_ma2, title="Plot MA2", linewidth=3)
plotshape(buy, title='LONG SIGNAL', style=shape.circle, location=location.belowbar, color=color_ma1, size=size.normal)
plotshape(sell, title='SHORT SIGNAL', style=shape.circle, location=location.abovebar, color=color_ma2, size=size.normal)
/////////////////////////// SIGNAL FOR STRATEGY /////////////////////////
Signal = buy ? 1 : sell ? -1 : 0
plot(Signal, title="🔌Connector🔌", transp=100)
Basically, I identified my buy, sell conditions in the code and added this at the bottom of my indicator code
Signal = buy ? 1 : sell ? -1 : 0
plot(Signal, title="🔌Connector🔌", transp=100)
Important Notes
🔥 The Strategy Template expects the value to be exactly 1 for the bullish signal , and -1 for the bearish signal
Now you can connect your indicator to the Strategy Template using the method below or that one
Step 2: Connect the connector
1) Add your updated indicator to a TradingView chart
2) Add the Strategy Template as well to the SAME chart
3) Open the Strategy Template settings and in the Data Source field select your 🔌Connector🔌 (which comes from your indicator)
From then, you should start seeing the signals and plenty of other stuff on your chart
🔥 Note that whenever you'll update your indicator values, the strategy statistics and visual on your chart will update in real-time
Settings
- Color Candles : Color the candles based on the trade state (bullish, bearish, neutral)
- Close positions at market at the end of each session : useful for everything but cryptocurrencies
- Session time ranges : Take the signals from a starting time to an ending time
- Close Direction : Choose to close only the longs, shorts, or both
- Date Filter : Take the signals from a starting date to an ending date
- Set the maximum losing streak length with an input
- Set the maximum winning streak length with an input
- Set the maximum consecutive days with a loss
- Set the maximum drawdown (in % of strategy equity)
- Set the maximum intraday loss in percentage
- Limit the number of trades per day
- Limit the number of trades per week
- Stop-loss: None or Percentage or Trailing Stop Percentage or ATR
- Take-Profit: None or Percentage or ATR
- Risk-Reward based on ATR multiple for the Stop-Loss and Take-Profit
This script is open-source so feel free to use it, and optimize it as you want
Alerts
Maybe you didn't know it but alerts are available on strategy scripts.
I added them in this template - that's cool because:
- if you don't know how to code, now you can connect your indicator and get alerts
- you have now a cool template showing you how to create alerts for strategy scripts
Source: www.tradingview.com
I hope you'll like it, use it, optimize it and most importantly....make some optimizations to your indicators thanks to this Strategy template
Special Thanks
Special thanks to @JosKodify as I borrowed a few risk management snippets from his website: kodify.net
Additional features
I thought of plenty of extra filters that I'll add later on this week on this strategy template
Best
Dave
Turtle Trade Channels Indicator TUTCILegendary trade system which proved that great traders can be made, not born.
Turtle Trade Experiment made 80% annual return for 4 years and made 150 million $
Turtle Trade trend following system is a complete opposite to the "buy low and sell high" approach.
This trend following system was taught to a group of average and normal individuals, and almost everyone turned into a profitable trader.
They used the basis logic of well known DONCHIAN CHANNELS which developed by Richard Donchian.
The main rule is "Trade an 20-day breakout and take profits when an 10-day high or low is breached ". Examples:
Buy a 20-day breakout and close the trade when price action reaches a 10-day low.
Go short a 20-day breakout and close the trade when price action reaches a 10-day high.
In this indicator,
The red line is the trading line which indicates the trend directio n:
Price bars over the trend line indicates uptrend
Price bars under the trend line means downtrend
The dotted blue line is the exit line.
Original system is:
Go long when the price High is equal to or above previous 20 day Highest price.
Go short when the price Low is equal to or below previous 20 day Lowest price.
Exit long positions when the price touches the exit line
Exit short positions when the price touches the exit line
Recommended initial stop-loss is ATR * 2 from the opening price.
Default system parameters were 20,10 and 55,20.
Original Turtle Rules:
To trade exactly like the turtles did, you need to set up two indicators representing the main and the failsafe system.
Set up the main indicator with EntryPeriod = 20 and ExitPeriod = 10 (A.k.a S1)
Set up the failsafe indicator with EntryPeriod = 55 and ExitPeriod = 20 using a different color. (A.k.a S2)
The entry strategy using S1 is as follows
Buy 20-day breakouts using S1 only if last signaled trade was a loss.
Sell 20-day breakouts using S1 only if last signaled trade was a loss.
If last signaled trade by S1 was a win, you shouldn't trade -Irregardless of the direction or if you traded last signal it or not-
The entry strategy using S2 is as follows:
Buy 55-day breakouts only if you ignored last S1 signal and the market is rallying without you
Sell 55-day breakouts only if you ignored last S1 signal and the market is pluging without you
You can Highlight the chart with provided trade signals:
Green background color when Long
Red background color when Short
No background color when flat
WARNING: TURTLE TRADE STOP or ADDING more UNITS RULES ARE NOT INCLUDED.
Author: Kıvanç Özbilgiç
Also you can show or hide trade signals with the button on the settings menu
TradingView Alerts to MT4 MT5 - Forex, indices, commoditiesHowdy Algo-Traders! This example script has been created for educational purposes - to present how to use and automatically execute TradingView Alerts on real markets.
I'm posting this script today for a reason. TradingView has just released a new feature of the PineScript language - ALERT() function. Why is it important? It is finally possible to set alerts inside PineScript strategy-type script, without the need to convert the script into study-type. You may say triggering alerts straight from strategies was possible in PineScript before (since June 2020), but it had its limitations. Starting today you can attach alert to any custom event you might want to include in your PineScript code.
With the new feature, it is easier not only to execute strategies, but to maintain codebase - having to update 2 versions of the code with each single modification was... ahem... inconvenient. Moreover, the need to convert strategy into study also meant it was required to rip the code from all strategy...() calls, which carried a lot of useful information, like entry price, position size, and more, definitely influencing results calculated by strategy backtest. So the strategy without these features very likely produced different results than with them. While it was possible to convert these features into study with some advanced "coding gymnastics", it was also quite difficult to test whether those gymnastics didn't introduce serious, bankrupting bugs.
//////
How does this new feature work? It is really simple. On your custom events in the code like "GoLong" or "GoShort", create a string variable containing all the values you need inside your alert and this string variable will be your alert's message. Then, invoke brand new alert() function and that's it (see lines 67 onwards in the script). Set it up in CreateAlert popup and enjoy. Alerts will trigger on candle close as freq= parameter specifies. Detailed specification of the new alert() function can be found in TradingView's PineScript Reference (www.tradingview.com), but there's nothing more than message= and freq= parameters. Nothing else is needed, it is very simple. Yet powerful :)
//////
Alert syntax in this script is prepared to work with TradingConnector. Strategy here is not too complex, but also not the most basic one: it includes full exits, partial exits, stop-losses and it also utilizes dynamic variables calculated by the code (such as stop-loss price). This is only an example use case, because you could handle variety of other functionalities as well: conditional entries, pending entries, pyramiding, hedging, moving stop-loss to break-even, delivering alerts to multiple brokers and more.
//////
This script is a spin-off from my previous work, posted over a year ago here: Some comments on strategy parameters have been discussed there, but let me copy-paste most important points:
* Commission is taken into consideration.
* Slippage is intentionally left at 0. Due to shorter than 1 second delivery time of TradingConnector, slippage is practically non-existing.
* This strategy is NON-REPAINTING and uses NO TRAILING-STOP or any other feature known to be causing problems.
* The strategy was backtested on EURUSD 6h timeframe, will perform differently on other markets and timeframes.
Despite the fact this strategy seems to be still profitable, it is not guaranteed it will continue to perform well in the future. Remember the no.1 rule of backtesting - no matter how profitable and good looking a script is, it only tells about the past. There is zero guarantee the same strategy will get similar results in the future.
Full specs of TradingView alerts and how to set them up can be found here: www.tradingview.com
Indicator - ATR Profit Loss - DGHi Traders,
This is an on chart indicator that can be used for setting take profit and stop losses very easily using the Average True Range Indicator (ATR). Using a volatility adjusted TP and SL will allow you to set your targets and losses based on market conditions. In the settings, you are able to adjust how much of a multiplier you require depending on your risk tolerance and strategy. For those that follow the NNFX method, the defult settings are preset to 1xATR TP and 1.5xATR SL.
How to use:
- For longs, 'isLong' box must be ticked, for shorts, this box is unticked
- For longs, green line is TP, red line is SL
- For shorts, red line is TP, green line is SL
Regards,
Dillon Grech
Probability of ATR Index [racer8]Deriving the indicator:
PAI is an indicator I created that tells you the probability of current price moving a specified ATR distance over a specified number of periods into the future. It takes into account 4 variables: the ATR & the standard deviation of price, and the 2 parameters: ATR distance and # bars (time).
The formula is very complex so I will not be able to explain it without confusion arising.
What I can say is that I used integral calculus & the Taylor series to derive a formula that calculates the area under half of the normal distribution function. Thus, the formula was repeated twice in the code to derive the full probability (half + half = whole). If you can read the code, you might be wondering why the formula is so long...
The reason for this is because in Pine Script, the erf function doesn't exist. You see, the formula for normal distribution is: f(x) = (1/sqrt(2pi))*e^(-xx/2), assuming of course that the standard deviation = 1 and mu (mean) = 1. The next step is to take the integral of this formula in order to find the area under f(x). The problem is that I found the integral, F(x), of the normal distribution formula to be equal to F(x) = erf(x/sqrt(2))/2...and the erf function cannot be directly computed into Pinescript.
So I developed a solution...why not estimate the integral function? So that's exactly what I did using a technique involving the Taylor series. The Taylor series is an algebraic function that allows you to create a new function that can estimate the existing function. On a graph, the new function has the same values as the existing one, the only difference is that it uses a differnt formula, in this case, a formula that makes it possible to compute the integral. The disadvantage of using this new formula is that it is super long and if you want it to better represent the original integral over a wider range of x-values, you have to make it longer.
Signal Interpretion:
The hotter the colour, the more likely price will reach your specified distance.
The 2 values of PAI in the bottom window represent probability & average probability of your specifed distance geting hit.
Applications:
Stop loss placement---
This indicator is useful because it gives you an idea of the likelihood that a stop loss at a particular distance away from price (in ATRs) will be hit over a period of time specified. This is helpful in placing stop losses.
Options trading---
PAI can also be used in options trading. For example, you are using a strangle options strategy, and you want to make sure that price stays within the Strangle's profit range. So you only trade when PAI presents a low probability value of moving at a particular distance in ATRs over n periods.
Anyhow, I hope you guys like it. Enjoy! and hit that like button for me :)
L2 Candle Pattern ScalperLevel: 2
Background
Japanese candlesticks provide more detailed and accurate information about price movements compared to bar charts. They provide a graphical representation of the supply and demand behind the price promotions for each period. Each candlestick contains a central part that indicates the distance between the opening and closing of the security being traded, the area called the body.
Scalping is a trading strategy that aims to take advantage of minor changes in the stock price. Traders using this strategy place anywhere from 10 to a few hundred trades in a single day with the belief that small moves in the stock price are easier to catch than large ones. Traders who implement this strategy are known as scalpers. Lots of small wins can easily lead to big wins if a strict exit strategy is used to prevent big losses.
Function
L2 Candle Pattern Scalper utilizes candle pattern to decide long and short entry signal. It use inherent candles' relationship nearby to judge the market trend is up or down and decide to long or short.
Signal
buysmall --> long entry
exitred --> short entry
Pros and Cons
Pros:
1. its response is fast because OHLC candle is the raw source of market
2. it is suitable for scalping because it studies nearby candles to judge very short term trend change
Cons:
1. Mid-long term change is missing from this indicator, although I use fast and slow lines to indicate the mid-term trend.
2. No stop loss or take profit scheme is introduced.
Remarks
This is promising but need efforts to refine it.
Readme
In real life, I am a prolific inventor. I have successfully applied for more than 60 international and regional patents in the past 12 years. But in the past two years or so, I have tried to transfer my creativity to the development of trading strategies. Tradingview is the ideal platform for me. I am selecting and contributing some of the hundreds of scripts to publish in Tradingview community. Welcome everyone to interact with me to discuss these interesting pine scripts.
The scripts posted are categorized into 5 levels according to my efforts or manhours put into these works.
Level 1 : interesting script snippets or distinctive improvement from classic indicators or strategy. Level 1 scripts can usually appear in more complex indicators as a function module or element.
Level 2 : composite indicator/strategy. By selecting or combining several independent or dependent functions or sub indicators in proper way, the composite script exhibits a resonance phenomenon which can filter out noise or fake trading signal to enhance trading confidence level.
Level 3 : comprehensive indicator/strategy. They are simple trading systems based on my strategies. They are commonly containing several or all of entry signal, close signal, stop loss, take profit, re-entry, risk management, and position sizing techniques. Even some interesting fundamental and mass psychological aspects are incorporated.
Level 4 : script snippets or functions that do not disclose source code. Interesting element that can reveal market laws and work as raw material for indicators and strategies. If you find Level 1~2 scripts are helpful, Level 4 is a private version that took me far more efforts to develop.
Level 5 : indicator/strategy that do not disclose source code. private version of Level 3 script with my accumulated script processing skills or a large number of custom functions. I had a private function library built in past two years. Level 5 scripts use many of them to achieve private trading strategy.
RSI and Smoothed RSI Bull Div Strategy [BigBitsIO]This strategy focuses on finding a low RSI value, then targeting a low Smoothed RSI value while the price is below the low RSI in the lookback period to trigger a buy signal.
Features Take Profit, Stop Loss, and Plot Target inputs. As well as many inputs to manage how the RSI and Smoothed RSI are configured within the strategy.
Explanation of all the inputs
Take Profit %: % change in price from position entry where strategy takes profit
Stop Loss %: % change in price from position entry where strategy stops losses
RSI Lookback Period: # of candles used to calculate RSI
Buy Below Lowest Low In RSI Divergence Lookback Target %: % change in price from lowest RSI candle in divergence lookback if set
Source of Buy Below Target Price: Source of price (close, open, high, low, etc..) used to calculated buy below %
Smoothed RSI Lookback Period: # of candles used to calculate RSI
RSI Currently Below: Value the current RSI must be below to trigger a buy
RSI Divergence Lookback Period: # of candles used to lookback for lowest RSI in the divergence lookback period
RSI Lowest In Divergence Lookback Currently Below: Require the lowest RSI in the divergence lookback to be below this value
RSI Sell Above: If take profit or stop loss is not hit, the position will sell when RSI rises above this value
Minimum SRSI Downtrend Length: Require that the downtrend length of the SRSI be this value or higher to trigger a buy
Smoothed RSI Currently Below: Value the current SRSI must be below to trigger a buy
Scripting Tutorial B - TManyMA - Commission/FeesThis script is for a triple moving average strategy where the user can select from different types of moving averages, price sources, lookback periods and resolutions.
Features:
- 3 Moving Averages with variable MA types, periods, price sources, resolutions and the ability to disable each individually.
- Crossovers are plotted on the chart with detailed information regarding the crossover (Ex: 50 SMA crossed over 200 SMA )
- Forecasting available for all three MAs. MA values are forecasted 5 values out and plotted as if a continuation to the MA.
- Forecast bias also applies to all forecasting. Bias means we can forecast based on an anticipated bullish , bearish or neutral direction in the market.
- To understand bias, please read the source code, or if you can't read the code just send me a message on here or Twitter . Twitter should be linked to my profile.
- Ribbons added and on by default. Optional setting to disable the ribbons. 5 ribbons between MA1 and MA2 and another 5 between MA2 and MA3.
- Ribbons are alpha-color coded based on their relation to their default MAs.
- Ribbons are only visible between MAs if the MAs being compared share the same Type, Resolution, and Source because there is no way to consolidate those three in a simple manner.
- Ribbon values are calculated based on calculated MA Periods between the MAs.
- Converted the existing study into a strategy.
- Strategy only enters long positions with a market order when MA crossovers occur.
- Strategy exits positions when crossunders occur.
- Trades 100% of the equity with one order/position by default.
- Ability to disable trading certain crosses with input checks.
- Ability to exit trades with a take profit or stop loss.
- User input to allow quick changes to the take profit or stop loss percentages.
- Strategy now calculates on every tick
- Strategy also includes fixed commission values based on Coinbase standard order fees
This script is meant as an educational script with well-formatted styling, and references for specific functions.
*** PLEASE NOTE - THIS STRATEGY IS MEANT FOR LEARNING PURPOSES. DEPENDING ON IT'S CONFIGURATION IT MAY OR MAY NOT BE USEFUL FOR ACTUAL TRADING. THE STRATEGY IS NOT FINANCIAL ADVICE ***
Chandelier Exit V2 by fr3762 KIVANÇChandelier Exit Version 2 with two lines Long Stop and Short Stop
There is a Chandelier exit for long positions and one for short positions. The Chandelier Exit (long) hangs three ATR values below the 22-period high. This means it rises and falls as the period high and the ATR value changes. The Chandelier Exit for short positions is placed three ATR values above the 22-period low. The spreadsheet examples show sample calculations for both.
According to the theory, traders should exit long positions at either the highest high since entry minus 3 ATRs .
Similarly traders should exit short positions at either the lowest low since entry plus 3 ATRs .
Developed by Charles Le Beau and featured in Alexander Elder's books, the Chandelier Exit sets a trailing stop-loss based on the Average True Range (ATR). The indicator is designed to keep traders in a trend and prevent an early exit as long as the trend extends. Typically, the Chandelier Exit will be above prices during a downtrend and below prices during an uptrend.
The author, Chuck LeBeau explains: It lets "... profits run in the direction of a trend while still offering some protection against any reversal in trend."
The exit stop is placed at a multiple of average true ranges from the highest high or highest close since the entry of the trade.
Chandelier Exit will rise instantly whenever new highs are reached. As the highs get higher the stop moves up but it never moves downward.
The Chandelier Exit is mostly used to set a trailing stop-loss during a trend. Trends sometimes extend further than we anticipate and the Chandelier Exit can help traders ride the trend a little longer. Even though it is mostly used for stop-losses, the Chandelier Exit can also be used as a trend tool. A break above the Chandelier Exit (long) signals strength, while a break below the Chandelier Exit (short) signals weakness. Once a new trend begins, chartists can then use the corresponding Chandelier Exit to help define this trend.
Developer: Charles Le Beau
Here's the link to a complete list of all my indicators:
tr.tradingview.com
Şimdiye kadar paylaştığım indikatörlerin tam listesi için: tr.tradingview.com
Chandelier Exit by fr3762 KIVANÇChandelier Exit
Developed by Charles Le Beau and featured in Alexander Elder's books, the Chandelier Exit sets a trailing stop-loss based on the Average True Range (ATR). The indicator is designed to keep traders in a trend and prevent an early exit as long as the trend extends. Typically, the Chandelier Exit will be above prices during a downtrend and below prices during an uptrend.
The author, Chuck LeBeau explains: It lets "... profits run in the direction of a trend while still offering some protection against any reversal in trend."
According to the theory, traders should exit long positions at either the highest high since entry minus 3 ATRs .
Similarly traders should exit short positions at either the lowest low since entry plus 3 ATRs .
The exit stop is placed at a multiple of average true ranges from the highest high or highest close since the entry of the trade.
Chandelier Exit will rise instantly whenever new highs are reached. As the highs get higher the stop moves up but it never moves downward.
The Chandelier Exit is mostly used to set a trailing stop-loss during a trend. Trends sometimes extend further than we anticipate and the Chandelier Exit can help traders ride the trend a little longer. Even though it is mostly used for stop-losses, the Chandelier Exit can also be used as a trend tool. A break above the Chandelier Exit (long) signals strength, while a break below the Chandelier Exit (short) signals weakness. Once a new trend begins, chartists can then use the corresponding Chandelier Exit to help define this trend.
Developer: Charles Le Beau
Forex Master (EUR/USD)ATTENTION:
This is a symmetrical algorithm designed only for trading EUR/USD on the 1h time frame. For other currency pairs and time frames, you need to re-calibrate the RSI-EMAs as well as the profit targets and stop losses.
BACKTEST CONDITIONS:
Initial equity = $100,000 (no leverage)
Order size = 100% of equity
Pyramiding = disabled
TRADING RULES:
Long entry = EMA20(RSI10) cross> 50
Profit limit = 50 pips
Stop loss = 50 pips
Short entry = EMA30(RSI30) cross< 50
Profit limit = 50 pips
Stop loss = 50 pips
Long entry = Short exit
Short entry = long exit
DISCLAIMER: None of my ideas and posts are investment advice. Past performance is not an indication of future results. This strategy was constructed with the benefit of hindsight and its future performance cannot be guaranteed.
Fibonacci + TP/SL Strategy [Backtest]✅ Key Features Added and Adjusted:
Fibonacci Retracement Levels:
Automatically calculated based on the last 100 bars' high/low
Plotted levels: 0%, 23.6%, 38.2%, 50%, 61.8%, 78.6%, 100%
Extension targets: 161.8%, 261.8%, 423.6%
Buy/Sell Signal Logic:
Buy: Price is between 78.6% and 38.2% levels
Sell: Price is between 61.8% and 23.6% levels
Both depend on a can_trade time filter to avoid overtrading
ATR-based Stop-Loss:
Stop-loss dynamically adapts to market volatility:
SL = Entry - ATR * 1.5 (long)
SL = Entry + ATR * 1.5 (short)
Fixed Take-Profit:
Configurable via input: default is 4%
Can be changed in TradingView UI
Golden/Death Cross Indicator (Visual Only):
EMA 50 crossing EMA 200 plotted on chart:
Golden Cross = Buy signal (green triangle)
Death Cross = Sell signal (red triangle)
Weekly Profit Cap:
Prevents new trades if weekly profit exceeds 15%
Resets at the start of every week
Visual Elements:
All Fibonacci levels are plotted
Buy/Sell signals are labeled on the chart (BUY, SELL)
PowerHouse SwiftEdge AI v2.10 StrategyOverview
The PowerHouse SwiftEdge AI v2.10 Strategy is a sophisticated trading system designed to identify high-probability trade setups in forex, stocks, and cryptocurrencies. By combining multi-timeframe trend analysis, momentum signals, volume confirmation, and smart money concepts (Change of Character and Break of Structure ), this strategy offers traders a robust tool to capitalize on market trends while minimizing false signals. The strategy’s unique “AI” component analyzes trends across multiple timeframes to provide a clear, actionable dashboard, making it accessible for both novice and experienced traders. The strategy is fully customizable, allowing users to tailor its filters to their trading style.
What It Does
This strategy generates Buy and Sell signals based on a confluence of technical indicators and smart money concepts. It uses:
Multi-Timeframe Trend Analysis: Confirms the market’s direction by analyzing trends on the 1-hour (60M), 4-hour (240M), and daily (D) timeframes.
Momentum Filter: Ensures trades align with strong price movements to avoid choppy markets.
Volume Filter: Validates signals with above-average volume to confirm market participation.
Breakout Filter: Requires price to break key levels for added confirmation.
Smart Money Signals (CHoCH/BOS): Identifies reversals (CHoCH) and trend continuations (BOS) based on pivot points.
AI Trend Dashboard: Summarizes trend strength, confidence, and predictions across timeframes, helping traders make informed decisions without needing to analyze complex data manually.
The strategy also plots dynamic support and resistance trendlines, take-profit (TP) levels, and “Get Ready” signals to alert users of potential setups before they fully develop. Trades are executed with predefined take-profit and stop-loss levels for disciplined risk management.
How It Works
The strategy integrates multiple components to create a cohesive trading system:
Multi-Timeframe Trend Analysis:
The strategy evaluates trends on three timeframes (1H, 4H, Daily) using Exponential Moving Averages (EMA) and Volume-Weighted Average Price (VWAP). A trend is considered bullish if the price is above both the EMA and VWAP, bearish if below, or neutral otherwise.
Signals are only generated when the trend on the user-selected higher timeframe aligns with the trade direction (e.g., Buy signals require a bullish higher timeframe trend). This reduces noise and ensures trades follow the broader market context.
Momentum Filter:
Measures the percentage price change between consecutive bars and compares it to a volatility-adjusted threshold (based on the Average True Range ). This ensures trades are taken only during significant price movements, filtering out low-momentum conditions.
Volume Filter (Optional):
Checks if the current volume exceeds a long-term average and shows positive short-term volume change. This confirms strong market participation, reducing the risk of false breakouts.
Breakout Filter (Optional):
Requires the price to break above (for Buy) or below (for Sell) recent highs/lows, ensuring the signal aligns with a structural shift in the market.
Smart Money Concepts (CHoCH/BOS):
Change of Character (CHoCH): Detects potential reversals when the price crosses under a recent pivot high (for Sell) or over a recent pivot low (for Buy) with a bearish or bullish candle, respectively.
Break of Structure (BOS): Confirms trend continuations when the price breaks below a recent pivot low (for Sell) or above a recent pivot high (for Buy) with strong momentum.
These signals are plotted as horizontal lines with labels, making it easy to visualize key levels.
AI Trend Dashboard:
Combines trend direction, momentum, and volatility (ATR) across timeframes to calculate a trend score. Scores above 0.5 indicate an “Up” trend, below -0.5 indicate a “Down” trend, and otherwise “Neutral.”
Displays a table summarizing trend strength (as a percentage), AI confidence (based on trend alignment), and Cumulative Volume Delta (CVD) for market context.
A second table (optional) shows trend predictions for 1H, 4H, and Daily timeframes, helping traders anticipate future market direction.
Dynamic Trendlines:
Plots support and resistance lines based on recent swing lows and highs within user-defined periods (shortTrendPeriod, longTrendPeriod). These lines adapt to market conditions and are colored based on trend strength.
Why This Combination?
The PowerHouse SwiftEdge AI v2.10 Strategy is original because it seamlessly integrates traditional technical analysis (EMA, VWAP, ATR, volume) with smart money concepts (CHoCH, BOS) and a proprietary AI-driven trend analysis. Unlike standalone indicators, this strategy:
Reduces False Signals: By requiring confluence across trend, momentum, volume, and breakout filters, it minimizes trades in choppy or low-conviction markets.
Adapts to Market Context: The ATR-based momentum threshold adjusts dynamically to volatility, ensuring signals remain relevant in both trending and ranging markets.
Simplifies Decision-Making: The AI dashboard distills complex multi-timeframe data into a user-friendly table, eliminating the need for manual analysis.
Leverages Smart Money: CHoCH and BOS signals capture institutional price action patterns, giving traders an edge in identifying reversals and continuations.
The combination of these components creates a balanced system that aligns short-term trade entries with longer-term market trends, offering a unique blend of precision, adaptability, and clarity.
How to Use
Add to Chart:
Apply the strategy to your TradingView chart on a liquid symbol (e.g., EURUSD, BTCUSD, AAPL) with a timeframe of 60 minutes or lower (e.g., 15M, 60M).
Configure Inputs:
Pivot Length: Adjust the number of bars (default: 5) to detect pivot highs/lows for CHoCH/BOS signals. Higher values reduce noise but may delay signals.
Momentum Threshold: Set the base percentage (default: 0.01%) for momentum confirmation. Increase for stricter signals.
Take Profit/Stop Loss: Define TP and SL in points (default: 10 each) for risk management.
Higher/Lower Timeframe: Choose timeframes (60M, 240M, D) for trend filtering. Ensure the chart timeframe is lower than or equal to the higher timeframe.
Filters: Enable/disable momentum, volume, or breakout filters to suit your trading style.
Trend Periods: Set shortTrendPeriod (default: 30) and longTrendPeriod (default: 100) for trendline plotting. Keep below 2000 to avoid buffer errors.
AI Dashboard: Toggle Enable AI Market Analysis to show/hide the prediction table and adjust its position.
Interpret Signals:
Buy/Sell Labels: Green "Buy" or red "Sell" labels indicate trade entries with predefined TP/SL levels plotted.
Get Ready Signals: Yellow "Get Ready BUY" or orange "Get Ready SELL" labels warn of potential setups.
CHoCH/BOS Lines: Aqua (CHoCH Sell), lime (CHoCH Buy), fuchsia (BOS Sell), or teal (BOS Buy) lines mark key levels.
Trendlines: Green/lime (support) or fuchsia/purple (resistance) dashed lines show dynamic support/resistance.
AI Dashboard: Check the top-right table for trend strength, confidence, and CVD. The optional bottom table shows trend predictions (Up, Down, Neutral).
Backtest and Trade:
Use TradingView’s Strategy Tester to evaluate performance. Adjust TP/SL and filters based on results.
Trade manually based on signals or automate with TradingView alerts (set alerts for Buy/Sell labels).
Originality and Value
The PowerHouse SwiftEdge AI v2.10 Strategy stands out by combining multi-timeframe analysis, smart money concepts, and an AI-driven dashboard into a single, user-friendly system. Its adaptive momentum threshold, robust filtering, and clear visualizations empower traders to make confident decisions without needing advanced technical knowledge. Whether you’re a day trader or swing trader, this strategy provides a versatile, data-driven approach to navigating dynamic markets.
Important Notes:
Risk Management: Always use appropriate position sizing and risk management, as the strategy’s TP/SL levels are customizable.
Symbol Compatibility: Test on liquid symbols with sufficient historical data (at least 2000 bars) to avoid buffer errors.
Performance: Backtest thoroughly to optimize settings for your market and timeframe.
DropHunterBuy: Green triangle under the candle (price at the lower BB band, RSI < 30, EMA(9) > EMA(50)).
Stop loss: 10-15 points (M15) or 20-30 points (H1).
Take profit: 20-30 points (M15) or 50-70 points (H1).
Sale: Red triangle above the candle (price at the upper BB band, RSI > 70, EMA(9) < EMA(50)).
Stop loss and take profit are similar.
Exit: Close the position when the middle BB line (bbMiddle) is reached or when the opposite signal is given.
Risk: 2-5% deposit per transaction (for example, $20-50 with a deposit of $1000).
CYCLE BY RiotWolftradingDescription of the "CYCLE" Indicator
The "CYCLE" indicator is a custom Pine Script v5 script for TradingView that visualizes cyclic patterns in price action, dividing the trading day into specific sessions and 90-minute quarters (Q1-Q4). It is designed to identify and display market phases (Accumulation, Manipulation, Distribution, and Continuation/Reversal) along with key support and resistance levels within those sessions. Additionally, it allows customization of boxes, lines, labels, and colors to suit user preferences.
Main Features
Cycle Phases:
Accumulation (1900-0100): Represents the phase where large operators accumulate positions.
Manipulation (0100-0700): Identifies potential manipulative moves to mislead retail traders.
Distribution (0700-1300): The phase where large operators distribute their positions.
Continuation/Reversal (1300-1900): Indicates whether the price continues the trend or reverses.
90-Minute Quarters (Q1-Q4):
Divides each 6-hour cycle (360 minutes) into four 90-minute quarters (Q1: 00:00-01:30, Q2: 01:30-03:00, Q3: 03:00-04:30, Q4: 04:30-06:00 UTC).
Each quarter is displayed with a colored box (Q1: light purple, Q2: light blue, Q3: light gray, Q4: light pink) and labels (defaulted to black).
Support and Resistance Visualization:
Draws boxes or lines (based on settings) showing the high and low levels of each session.
Optionally displays accumulated volume at the highs and lows within the boxes.
Daily Lines and Last 3 Boxes:
How to Use the Indicator
Step 1: Add the Indicator to TradingView
Open TradingView and select the chart where you want to apply the indicator (e.g., UMG9OOR on a 5-minute timeframe, as shown in the screenshot).
Go to the Pine Editor (at the bottom of the TradingView interface).
Copy and paste the provided code.
Click Compile and then Add to Chart.
Step 2: Configure the Indicator
Click on the indicator name on the chart ("CYCLE") and select Settings (or double-click the name).
Adjust the options based on your needs:
Cycle Phases: Enable/disable phases (Accumulation, Manipulation, Distribution, Continuation/Reversal) and adjust their time slots if needed.
90-Minute Quarters: Enable/disable quarters (Q1-Q4).
Step 3: Interpret the Indicator
Identify Cycle Phases:
Observe the red boxes indicating the phases (Accumulation, Manipulation, etc.).
The high and low levels within each phase are potential support/resistance zones.
If volume is enabled, pay attention to the accumulated volume at highs and lows, as it may indicate the strength of those levels.
Use the 90-Minute Quarters (Q1-Q4):
The colored boxes (Q1-Q4) divide the day into 90-minute segments.
Each quarter shows the price range (high and low) during that period.
Use these boxes to identify price patterns within each quarter, such as breakouts or consolidations.
The labels (Q1, Q2, etc.) help you track time and anticipate potential moves in the next quarter.
Analyze Support and Resistance:
The high and low levels of each phase/quarter act as support and resistance.
Daily lines (if enabled) show key levels from the previous day, useful for planning entries/exits.
The "last 3 boxes below price" (if enabled) highlight potential support levels the price might target.
Avoid Manipulation:
During the Manipulation phase (0100-0700), be cautious of sharp moves or false breakouts.
Use the high/low levels of this phase to identify potential traps (as explained in your first question about manipulation candles).
Step 4: Trading Strategy
Entries and Exits:
Support/Resistance: Use the high/low levels of phases and quarters to set entry or exit points.
For example, if the price bounces off a Q1 support level, consider a buy.
Breakouts: If the price breaks a high/low of a quarter (e.g., Q2), wait for confirmation to enter in the direction of the breakout.
Volume: If accumulated volume is high near a key level, that level may be more significant.
Risk Management:
Place stop-loss orders below lows (for buys) or above highs (for sells) identified by the indicator.
Avoid trading during the Manipulation phase unless you have a specific strategy to handle false breakouts.
Time Context:
Use the quarters (Q1-Q4) to plan your trades based on time. For example, if Q3 is typically volatile in your market, prepare for larger moves between 03:00-04:30 UTC.
Step 5: Adjustments and Testing
Test on Different Timeframes: The indicator is set for a 5-minute timeframe (as in the screenshot), but you can test it on other timeframes (e.g., 1-minute, 15-minute) by adjusting the time slots if needed.
Adjust Colors and Styles: If the default colors are not visible on your chart, change them for better clarity.
---
📌 1. **Accumulation: Strong Institutional Activity**
- During the **accumulation phase, we see **high volume: 82.773K, which suggests strong buying interest**, likely from institutional players.
- This sets the base for the following upward move in price.
---
📌 2. **Manipulation: False Breakout with Lower Volume**
- Later, there's a manipulation phase where price breaks above previous highs, but the volume (71.814K) is **lower than during accumulation**.
- This implies that buyers are not as aggressive as before—no real demandbehind the breakout.
- It’s likely a bull trap, where smart money is selling into the breakout to exit their positions.
---
### 📌 3. Distribution: Weakness and Lack of Demand
- The market enters a distribution phase, and volume drops even further (only 7.914K).
- Price struggles to go higher, and you start seeing rejections at the top.
- This shows that demand is drying up, and smart money is offloading positions**—not accumulating anymore.
---
### 💡 Why Take the Short Here?
- Volume is not increasing with new highs—showing weak demand**.
- The manipulation volume is weaker than the accumulation volume, confirming the breakout was likely false.
- Structure starts to break down (Q levels falling), which confirms weakness.
- This creates a high-probability short setup:
- **Entry:** after confirmation of distribution and structural breakdown.
- **Stop loss:** above the manipulation high.
- **Target:** down toward previous lows or value zones.
---
### ✅ Conclusion
Since the manipulation volume failed to exceed the accumulation volume, the breakout lacked real strength. Combined with decreasing volume in the distribution phase, this indicates fading demand and supply taking control—which justifies entering a short position.
Rawstocks 15 Minute ModelRawstocks 15-Minute Model
The Rawstocks 15-Minute Model is a precision intraday trading strategy designed for the US stock market (9:30 AM - 4:00 PM ET), optimized for the 15-minute timeframe. It combines institutional order flow concepts with Fibonacci retracements to identify high-probability reversal setups while enforcing strict risk management and session-based rules.
Key Features
Time-Based Execution
Trading Hours: 9:30 AM - 4:00 PM ET (no new entries after 4:00 PM)
Force Close: All positions auto-exit at 4:30 PM ET (prevents overnight risk)
Entry Logic
Order Block + Fib Confluence:
Identifies institutional order blocks (previous swing highs/lows)
Requires price pullback to 61.8% or 79% Fibonacci level
Liquidity Confirmation:
Waits for stop runs (liquidity sweeps) before reversal entries
Exit Rules
Stop Loss: 1x ATR (14) from entry
Take Profit: 2:1 Risk-Reward (adjustable)
Visual Signals
Green Triangle: Valid long setup (pullback to bullish OB + Fib)
Red Triangle: Valid short setup (pullback to bearish OB + Fib)
Blue/Purple Background: Highlights active trading vs. close period
How It Works
Identify the Setup
Wait for a strong impulse move (break of structure)
Mark the order block (institutional zone)
Confirm Pullback
Price must retrace to 61.8% or 79% Fib level
Must occur within trading hours (9:30 AM - 4:00 PM)
Enter on Confirmation
Long: Break of pullback candle high (stop below recent swing low)
Short: Break of pullback candle low (stop above recent swing high)
Manage the Trade
Trail stop or exit at 2R (risk-to-reward)
All positions close at 4:30 PM sharp